<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>
    var Animal = {

    }
    var Cat = {
        shareData:"this is shareData",
        creatNew : function(){
            var cat = {};
            cat.name = "catName";
            var personal = "this is personal";
            cat.seePersonal = function(){
                alert(personal);
            };
            cat.seeShareData = function(){
                alert(Cat.shareData);
            };
            cat.changeShareData = function(x){
                Cat.shareData = x;
            };
            return cat;
        }
    };
    var cat1 = Cat.creatNew();
    cat1.seeShareData();
    cat1.changeShareData("i change it");
    cat1.seeShareData();
</script>

</body>
</html>